from collections import deque


def f(n, l=[]):
    l.append(n)
    print(l)


def f1(n, l=None):
    if l is None:
        l = []
    l.append(n)
    print(l)


def print_enumerate(list_demo=[]):
    """ 打印列表

    使用enumerate()进行打印
    :param list_demo:
    :return:
    """
    for i, v in enumerate(list_demo):
        print("{} --> {}".format(i, v))

if __name__ == "__main__":
    # squares = [(x**2) for x in range(10)]
    # print(squares)
    #
    # squares1 = list(map(lambda x: x**2, range(10)))
    # print(squares1)
    list1 = [1, 2, 4, 5, 6]
    print_enumerate(list1)
